package cn.middle.remote;

import cn.middle.remote.server.LoginAuthHandler;
import cn.middle.remote.server.NettyServerProcessHandler;
import cn.middle.remote.server.ServerConfig;
import cn.middle.remote.server.ServerListener;
import cn.middle.remote.server.ServerProcessingHandler;

public abstract class Server implements Node, Channel {

	
	/**
	 * 配置文件
	 */
	protected ServerConfig config;
	
	/**
	 * 业务处理
	 */
	protected ServerProcessingHandler handler = new NettyServerProcessHandler();
	
	
	/**
	 * 鉴权
	 */
	protected LoginAuthHandler authHandler;
	
	
	/**
	 * 数据监听
	 */
	protected ServerListener listener;
	
	
	protected Server(ServerConfig config) {
		this.config = config;
	}

	public LoginAuthHandler getAuthHandler() {
		return authHandler;
	}


	public void setAuthHandler(LoginAuthHandler authHandler) {
		this.authHandler = authHandler;
	}


	public ServerListener getListener() {
		return listener;
	}


	public void setListener(ServerListener listener) {
		this.listener = listener;
	}	
}
